/**
* ...
* @author Default
* @version 0.1
*/

package  
{
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	import flash.events.Event;

	public class Main extends MovieClip
	{
		var menu: Menu;
		var instrucoes: Instrucoes;
		var fase1: Fase1;
		var irparaojogo: Irparaojogo;
		var irparainstrucoes: Irparainstrucoes;
		
		public function Main() 
		{
			desenharTela();
			stage.addEventListener(Event.ENTER_FRAME, update);
		}
		
		public function desenharTela():void
		{
			addChild(menu);
		}
	
		public function update(Evento:Event):void
		{
			irparaojogo.addEventListener(MouseEvent.CLICK, clique);
			irparainstrucoes.addEventListener(MouseEvent.CLICK, clique2);
		}
		public function clique(e:Event):void 
		{
			removeChild(menu);
			addChild(fase1);
		}
		public function clique2(e:Event):void 
		{
			removeChild(menu);
			addChild(instrucoes);
		}
	}
	
	
}
